package com.uni.crawl.service.crawl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.yulichang.base.MPJBaseService;
import com.uni.crawl.model.entity.crawl.CrawlTemplate;
import com.uni.crawl.model.form.crawl.CrawlTemplateForm;
import com.uni.crawl.model.form.crawl.CrawlTemplateMockForm;
import com.uni.crawl.model.query.crawl.CrawlTemplatePageQuery;
import com.uni.crawl.model.vo.crawl.CrawlTemplateMockRunVO;
import com.uni.crawl.model.vo.crawl.CrawlTemplateVO;

import java.util.List;

/**
 * <p>
 * 爬虫模板 服务类
 * </p>
 *
 * @author JervisPG
 * @since 2023-12-16
 */
public interface CrawlTemplateService extends MPJBaseService<CrawlTemplate> {

    boolean add(CrawlTemplateForm form);

    boolean delete(Long id);

    boolean switchStatus(Long id);

    CrawlTemplate getByTmplCode(String tmplCode);

    Page<CrawlTemplateVO> getPage(CrawlTemplatePageQuery pageQuery);

    List<CrawlTemplate> listScheduleTemplate();

    boolean update(Long id, CrawlTemplateForm form);

    CrawlTemplateForm getForm(Long id);

    CrawlTemplateMockRunVO mockRun(CrawlTemplateMockForm form) throws Exception;
}
